#ifndef DBCLIENT_H
#define DBCLIENT_H

#include <QObject>
#include <QSqlDatabase>
#include <QSqlQuery>
#include "../define.h"
class DBClient : public QObject
{
    Q_OBJECT
public:
    explicit DBClient();
    bool Connect(QString ip,QString port,QString user,QString pwd);
    QList<DeptNode> selectDeptQuery(QString sql);
    QMap<QString,QString> selectLoginQuery(QString sql);
    QList<QList<QString>> select(QString sql);
    QSqlDatabase getDataDBClient();
signals:

public slots:

private:
    QSqlDatabase dbClient;
    QSqlQuery *query;

    DeptNode *retNode;
};

#endif // DBCLIENT_H
